

import 'package:flutter_frame/app/core/http/http.dart';
import 'package:flutter_frame/app/core/utils/baseAliUrl.dart';
import 'package:flutter_frame/app/core/utils/interface.dart';
import 'package:flutter_frame/app/data/entities/auth/get_url_entity_entity.dart';
import 'package:flutter_frame/app/data/entities/auth/user_data_entity.dart';

abstract class AuthApis {

  /// @param
  /// @description 获取请求地址
  static HttpRequest<GetUrlEntityEntity> getUrl() {
    return HttpUtil().generateGetRequest(Interface.getAkyCompAppApiConfig,queryParameters: {'serverType': serverType});
  }

  /// @param type: 1
  /// @param grant_type: ''
  /// @return {返回值说明}
  /// @description 登录成功, 返回登录Token,
  static HttpRequest<UserDataEntity> login({
    required String username,
    required String password,
  }) {
    return HttpUtil().generatePostRequest(
      Interface.loginUrl,
      queryParameters: {
        'type': 1,
        'grant_type': 'password',
        'username': username,
        'password': password
      },
    );
  }




}
